package com.example.interfaces.exchange_confirm_03;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * ClassName: WarningConsumer
 * author: bob.ly
 * Version: 1.0.0
 * DateTime: 2021/07/26-23:01:00
 * Description:
 */
@Component
@Slf4j
public class WarningConsumer {

    @RabbitListener(queues = "warning.queue")
    public void receiveWarningMsg(Message message) {
        String msg = new String(message.getBody());
        log.error("报警发现不可路由消息：{}", msg);
    }
}
